﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace JumpNFight.Simulation
{
    class ElasticMoveable : 
        Moveable
    {
        public ElasticMoveable(int id)
            : base(id)
        {
            Elasticity = 1;
        }

        public float Elasticity
        {
            get;
            set;
        }

        public override void HitCeiling()
        {
            Velocity.Y = -Elasticity * Velocity.Y;
        }

        public override void HitWall()
        {
            Velocity.X = -Velocity.X;
        }

        public override void HitFloor()
        {
            Velocity.Y = -Elasticity * Velocity.Y;
        }
    }
}
